[rv_core_ibex] Add u-mode performance counters and mcounteren#30135
[rv_core_ibex] Add u-mode performance counters and mcounteren#30135SamuelRiedel wants to merge 4 commits into
mcounteren#30135Conversation
3baeac4 to
a204ac4
Compare
rswarbrick
left a comment
There was a problem hiding this comment.
Should the "Add missing rvfi ports" commit be squashed with the vendoring update? Otherwise, I think we have a (slightly) broken intermediate state of the repository?
| regwen); | ||
|
|
||
| // Since MCOUNTEREN_WRITABLE is True, writes to mcounteren should succeed. | ||
| csr_write_mcounteren(0x5); |
There was a problem hiding this comment.
Why is this using a hex constant instead of a define?
(Maybe the value doesn't really matter? But it still makes sense to stick it in a variable to avoid having to write a magic number in multiple places)
There was a problem hiding this comment.
There is no good reason for this. I added a define now and fixed it.
Signed-off-by: Samuel Riedel <sriedel@lowrisc.org>
Update code from upstream repository https://github.com/samuelriedel/ibex.git to revision c799da7a4de7e88e6db9768707541b79b610e3e1 Signed-off-by: Samuel Riedel <sriedel@lowrisc.org>
Signed-off-by: Samuel Riedel <sriedel@lowrisc.org>
Signed-off-by: Samuel Riedel <sriedel@lowrisc.org>
Yes good point. I will squash the two once we merge the Ibex PR and I vendor in Ibex from the main branch. |
mcounterenCSR to control which u-mode counters are accessiblemcounterenCSR can be locked through an input signal to prevent modifying it even in m-modemcounteren_writableregister inrv_core_ibexdriving the above signal. This register is lockable with themcounteren_writable_regwenregister.ToDo:
mcounterenregister in Ibexmcounterenregister ibex#2403 is merged